<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../vue.2.5.1.js"></script>
</head>

<body>

    <div id="app">
        <input type="text" v-model='msg_text'>
        <br>
        <span>{{msg_text}}</span>

        <br>
        <button @click='msg_reverse'>反转字符串按钮</button>
    </div>

    <script>
        var app = new Vue({
            el: '#app',
            data: {
                msg_text: 'sky',
                msg_html: '<h1>菜鸟教程</h1>',
                msg_attrid: 111,
                msg_bullen: true,
                msg_bullen_false: false
            },
            methods: {
                msg_reverse: function() {
                    this.msg_text = this.msg_text.split("").reverse().join("");
                }
            }
        })
    </script>
</body>